package com.tsd.jxc.fin.entity;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.tsd.core.utils.HlpUtils;
import com.tsd.core.utils.ListUtil;
import com.tsd.jxc.JxcConstants;
import com.tsd.jxc.fin.vo.PaymentRequestDetailVo;
import com.tsd.jxc.order.entity.JxcOrderCutMoneyExt;
import io.swagger.annotations.ApiModel;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * 财务-收付款请求单-明细扩展
 *
 * @author Hillpool
 * @date 2023/02/09 18:00:21
 */
@ApiModel(description = "财务-收付款请求单-明细扩展")
public class JxcFinancePaymentRequestDetailExt extends JxcFinancePaymentRequestDetail implements Serializable {

    public static final String SRC_TYPE_ORDER = "order";
    public static final String SRC_TYPE_FUND = "fund";
    public static final String SRC_TYPE_SEND = "send";
    public static final String SRC_TYPE_CUT = "cut";
    public static final String SRC_TYPE_IN_BILL = "in_bill";
    public static final String SRC_TYPE_OUT_BILL = "out_bill";

    private List<JxcOrderCutMoneyExt> cut_money_list;

    private String order_sid;

    private String order_detail_sid;

    private Integer pay_req_state;

    private String specifications;

    public List<JxcOrderCutMoneyExt> getCut_money_list() {
        return cut_money_list;
    }

    public void setCut_money_list(List<JxcOrderCutMoneyExt> cut_money_list) {
        this.cut_money_list = cut_money_list;
    }

    public String getOrder_sid() {
        return order_sid;
    }

    public void setOrder_sid(String order_sid) {
        this.order_sid = order_sid;
    }

    public String getOrder_detail_sid() {
        return order_detail_sid;
    }

    public void setOrder_detail_sid(String order_detail_sid) {
        this.order_detail_sid = order_detail_sid;
    }

    public Integer getPay_req_state() {
        return pay_req_state;
    }

    public void setPay_req_state(Integer pay_req_state) {
        this.pay_req_state = pay_req_state;
    }

    public String getSpecifications() {
        return specifications;
    }

    public void setSpecifications(String specifications) {
        this.specifications = specifications;
    }

    public PaymentRequestDetailVo convertExportVo() {
        PaymentRequestDetailVo exportVo = new PaymentRequestDetailVo();
        exportVo.setThe_date(HlpUtils.date2String(this.getThe_date(), HlpUtils.Format_Yyyy_M_d_2));
        exportVo.setThe_date_long(this.getThe_date().getTime());
        exportVo.setGoods_name(this.getGoods_name());
        exportVo.setSpec_info(this.getSpec_info());
        exportVo.setQty(this.getQty());
        exportVo.setPrice(this.getPrice());
        exportVo.setAmount(this.getAmount());
        exportVo.setPayment_amount(this.getPayment_amount());
        exportVo.setRemain_amount(this.getRemain_amount());
        exportVo.setNote_info(this.getNote_info());
        exportVo.setUnit(this.getUnit());
        return exportVo;
    }
}
